package cn.sportvip.entity.sport;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexType;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;
import org.springframework.data.mongodb.core.mapping.Document;

import cn.sportvip.Sport.AGE;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 记录场馆基本信息
 * 
 * @author tao
 */
@Document
public class GymnasiumBasic implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@JSONField(name = "id")
	private int gymnasiumId;
	@GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE, name = "gy_loc_2dsphere")
	private double location[];
	/** 场地名称 */
	private String name;
	/** 地址 */
	private String address;
	
	/**图片*/
	private List<String> pics = new ArrayList<>(0);
	/**与查询人之间的距离*/
	private double minPrice;
	private double maxPrice;
	
	List<Tag> tags = new ArrayList<>(0);
	Set<Event> events = new HashSet<>(0);
	
	/**开设课程适合那些年龄段*/
	private Set<AGE> ageRange = new HashSet<>(0);
	/**是否开设了课程没有开设不在附近场馆显示*/
	private boolean hasCourses = false;
	
	@Transient
	private double distance;

	public int getGymnasiumId() {
		return gymnasiumId;
	}

	public void setGymnasiumId(int gymnasiumId) {
		this.gymnasiumId = gymnasiumId;
	}

	public double[] getLocation() {
		return location;
	}

	public void setLocation(double[] location) {
		this.location = location;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public double getDistance() {
		return distance;
	}

	public void setDistance(double distance) {
		this.distance = distance;
	}

	public List<String> getPics() {
		return pics;
	}

	public void setPics(List<String> pics) {
		this.pics = pics;
	}

	public double getMinPrice() {
		return minPrice;
	}

	public void setMinPrice(double minPrice) {
		this.minPrice = minPrice;
	}

	public double getMaxPrice() {
		return maxPrice;
	}

	public void setMaxPrice(double maxPrice) {
		this.maxPrice = maxPrice;
	}

	public List<Tag> getTags() {
		return tags;
	}

	public void setTags(List<Tag> tags) {
		this.tags = tags;
	}
	
	public Set<Event> getEvents() {
		return events;
	}

	public void setEvents(Set<Event> events) {
		this.events = events;
	}

	public Set<AGE> getAgeRange() {
		return ageRange;
	}

	public void setAgeRange(Set<AGE> ageRange) {
		this.ageRange = ageRange;
	}

	public boolean isHasCourses() {
		return hasCourses;
	}

	public void setHasCourses(boolean hasCourses) {
		this.hasCourses = hasCourses;
	}
}
